import request from '@/utils/request/index.js'
export default {
  addOrUpdate(data) {
    return request({
      url: '/store/mini/dynamic/addOrUpdate',
      method: 'POST',
      data
    })
  },
  addDrafts(data) { // 左上角不验证信息草稿保存
    return request({
      url: '/store/mini/dynamic/addDrafts',
      method: 'POST',
      data
    })
  },
  deleteDrafts(data) { // 删除草稿箱，动态，评论，回复
    return request({
      url: '/store/mini/dynamic/delete',
      method: 'POST',
      data
    })
  },
  getDraftsList(data) { // 草稿箱列表
    return request({
      url: '/store/mini/dynamic/getDraftsList',
      method: 'POST',
      data
    })
  },
  getDynamicGoods(data) { // 单个创作商品查询
    return request({
      url: '/store/mini/dynamic/getDynamicGoods',
      method: 'GET',
      data
    })
  },
  getDynamicDetails(data) { // 单个创作详情
    return request({
      url: '/store/mini/dynamic/getDynamicDetails',
      method: 'GET',
      data
    })
  },
  getDynamicDraftsDetails(data) { // 预览
    return request({
      url: '/store/mini/dynamic/getDynamicDraftsDetails',
      method: 'GET',
      data
    })
  },
  oneKeyHelpSell(data) { // 一键帮卖
    return request({
      url: '/store/mini/dynamic/oneKeyHelpSell',
      method: 'POST',
      data
    },{isTransformResult: true})
  },
  helpSell(data) { // 编辑帮卖
    return request({
      url: '/store/mini/dynamic/helpSell',
      method: 'POST',
      data
    })
  },
  getSunCode(data) { // 获取小程序码
    return request({
      url: '/store/mini/invite/getSunCode',
      method: 'POST',
      data
    })
  },
  getPageBySpuId(data) { // 笔记
    return request({
      url: '/store/mini/material/getPageBySpuId',
      method: 'POST',
      data
    })
  },
  getMaterialInfo(data) { // 使用笔记查询
    return request({
      url: '/store/mini/material/getInfo',
      method: 'POST',
      data
    })
  }
}